const Router = require('koa-router')
const { Success } = require('../../core/http-exception')
const { Auth } = require('../../core/middleware/auth')
const { Task } = require('../../models/task')
const router = new Router({
  prefix: '/v1/taskList',
})
router.get('/list', new Auth().m, async (ctx, next) => {
  const list = await Task.getList(ctx.auth.id)
  ctx.body = {
    code: 200,
    data: list,
  }
})
module.exports = router

